﻿<?php include("conn.php"); ?>
<?php
	$Type=$_GET["Type"];
	$title=$_POST["title"];
    $conn=new Mysql();
	if($Type=="Up"){


		$a1_img = $_POST["a1_img"];
		$a2_img = $_POST["a2_img"];
		$a3_img = $_POST["a3_img"];
		$a4_img = $_POST["a4_img"];
		$a5_img = $_POST["a5_img"];

		$a1_url = $_POST["a1_url"];
		$a2_url = $_POST["a2_url"];
		$a3_url = $_POST["a3_url"];
		$a4_url = $_POST["a4_url"];
		$a5_url = $_POST["a5_url"];

		$sql = "UPDATE `lunbo` SET a1_img='$a1_img',a2_img='$a2_img',a3_img='$a3_img',a4_img='$a4_img',a5_img='$a5_img',a1_url='$a1_url',a2_url='$a2_url',a3_url='$a3_url',a4_url='$a4_url',a5_url='$a5_url' where id = '2'";
		//echo $sql;
		//exit;
        $conn->query($sql);
		
		OutErrorGo("幻灯片管理修改成功!","system-banner.php");
	}else if($Type=="Upwap"){


		$a1_img = $_POST["1a1_img"];
		$a2_img = $_POST["1a2_img"];
		$a3_img = $_POST["1a3_img"];
		$a4_img = $_POST["1a4_img"];
		$a5_img = $_POST["1a5_img"];

		$a1_url = $_POST["1a1_url"];
		$a2_url = $_POST["1a2_url"];
		$a3_url = $_POST["1a3_url"];
		$a4_url = $_POST["1a4_url"];
		$a5_url = $_POST["1a5_url"];

		$sql = "UPDATE `lunbo_wap` SET a1_img='$a1_img',a2_img='$a2_img',a3_img='$a3_img',a4_img='$a4_img',a5_img='$a5_img',a1_url='$a1_url',a2_url='$a2_url',a3_url='$a3_url',a4_url='$a4_url',a5_url='$a5_url' where id = '2'";

        $conn->query($sql);
		OutErrorGo("手机版幻灯片管理修改成功!","system-banner.php");
	}else if($Type=="Up2"){
		
		$a1_img = $_POST["a1_img"];
		$a2_img = $_POST["a2_img"];
		$a3_img = $_POST["a3_img"];
		$a4_img = $_POST["a4_img"];
		$a5_img = $_POST["a5_img"];
		$a6_img = $_POST["a6_img"];
		$a7_img = $_POST["a7_img"];
		$a8_img = $_POST["a8_img"];
		$a9_img = $_POST["a9_img"];
        $a10_img = $_POST["a10_img"];
        $a11_img = $_POST["a11_img"];
        $a12_img = $_POST["a12_img"];

		$sql = "UPDATE `mybanner` SET ppic_1='$a1_img',ppic_2='$a2_img',ppic_3='$a3_img',ppic_4='$a4_img',ppic_5='$a5_img',ppic_6='$a6_img',ppic_7='$a7_img',ppic_8='$a8_img',ppic_9='$a9_img',ppic_10='$a10_img',ppic_11='$a11_img',ppic_12='$a12_img' where id = '2'";
		//echo $sql;
		//exit;
        $conn->query($sql);
		
		OutErrorGo("广告位管理修改成功!","system-banner.php");
		}
?>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<?php include("public/cssjs.php");?>
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
<!--/meta 作为公共模版分离出去-->
<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	系统管理
	<span class="c-gray en">&gt;</span>
	基本设置
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>

<div class="page-container">
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl">
				<span>PC版banner图</span>
                <span>Wap版banner图</span>
				<span>广告位</span>
				
			</div>
			<div class="tabCon">
		<form name="form1" method="post" action="?Type=Up">		  
         <?php

         $conn=new Mysql();
         $rs =$conn->getRow("select * from lunbo");
if($rs)
{
	?>
   
	<table class="table table-bordered">
<tr >
  <td colspan="3" align="left" bgcolor="#FFFFFF">首页banner图编辑：<font color="#FF0000">1,920px × 500px</font></td>
  </tr>
  <tr  >
   <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片一：</td>
  <td width="455" bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a1_img&form=form1" name="key" width="448" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
  <td width="41" rowspan="3" bgcolor="#FFFFFF">
  <?php
  if($rs["a1_img"]!=""){
	  echo '<img src="../pic/'.$rs["a1_img"].'" width="100">';
	  }
  ?>
  </td>
  </tr>
  <tr  >
    <td bgcolor="#FFFFFF">文件名：
      <input type="text" name="a1_img" class="input-text"  value="<?php echo $rs["a1_img"];?>" size="60"></td>
    </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="a1_url" value="<?php echo $rs["a1_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片二：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a2_img&form=form1" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?
  if($rs["a2_img"]!=""){
	  echo '<img src="../pic/'.$rs["a2_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="a2_img" class="input-text"  value="<?php echo $rs["a2_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="a2_url" value="<?php echo $rs["a2_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片三：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a3_img&form=form1" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?
  if($rs["a3_img"]!=""){
	  echo '<img src="../pic/'.$rs["a3_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="a3_img" class="input-text"   value="<?php echo $rs["a3_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="a3_url" value="<?php echo $rs["a3_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片四：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a4_img&form=form1" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?php
  if($rs["a4_img"]!=""){
	  echo '<img src="../pic/'.$rs["a4_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="a4_img" class="input-text"  value="<?php echo $rs["a4_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="a4_url" value="<?php echo $rs["a4_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片五：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a5_img&form=form1" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?php
  if($rs["a5_img"]!=""){
	  echo '<img src="../pic/'.$rs["a5_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="a5_img" class="input-text"   value="<?php echo $rs["a5_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr   >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="a5_url" value="<?php echo $rs["a5_url"];?>" size="60"></td>
    </tr>
   
   
<tr>
            <td width="40" bgcolor="#FFFFFF">
      <div align="right"><font color="#FF0000">注意：</font></div>            </td>
            <td colspan="2" bgcolor="#FFFFFF"><font color="#FF0000">以上内容必须填写!</font></td>
    </tr>
<tr>
<td colspan="3" align="center" bgcolor="#FFFFFF"><div align="center">
<div class="butt" style="text-align: center;padding:10px 0;">
                                 <button type="submit" class="btn btn-xs btn-danger" style="margin-right: 50px;padding: 2px 10px;">
                                     <i class="fa fa-plus">
                                     </i>
                                     保存设置
                                 </button>
                                
     						</div>
      <br>
      <br>
</div></td>
</tr>	
                        </table>
	<?php
}
?>
</form>
			</div>
            <div class="tabCon">
		<form name="form3" method="post" action="?Type=Upwap">		  
         <?

         $conn2=new Mysql();
         $rs =$conn2->getRow("select * from lunbo_wap where id =2");
if($rs)
{
	?>
   
	<table class="table table-bordered">
                          

<tr >
  <td colspan="3" align="left" bgcolor="#FFFFFF">手机banner图编辑：<font color="#FF0000">750px × 400px</font></td>
  </tr>
  <tr  >
   <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片一：</td>
  <td width="455" bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=1a1_img&form=form3" name="key" width="448" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
  <td width="41" rowspan="3" bgcolor="#FFFFFF">
  <?php
  if($rs["a1_img"]!=""){
	  echo '<img src="../pic/'.$rs["a1_img"].'" width="100">';
	  }
  ?>
  </td>
  </tr>
  <tr  >
    <td bgcolor="#FFFFFF">文件名：
      <input type="text" name="1a1_img" class="input-text"  value="<?php echo $rs["a1_img"];?>" size="60"></td>
    </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="1a1_url" value="<?php echo $rs["a1_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片二：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=1a2_img&form=form3" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?php
  if($rs["a2_img"]!=""){
	  echo '<img src="../pic/'.$rs["a2_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="1a2_img" class="input-text"  value="<?php echo $rs["a2_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="1a2_url" value="<?php echo $rs["a2_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片三：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=1a3_img&form=form3" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?
  if($rs["a3_img"]!=""){
	  echo '<img src="../pic/'.$rs["a3_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="1a3_img" class="input-text"   value="<?php echo $rs["a3_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="1a3_url" value="<?php echo $rs["a3_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片四：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=1a4_img&form=form3" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?
  if($rs["a4_img"]!=""){
	  echo '<img src="../pic/'.$rs["a4_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="1a4_img" class="input-text"  value="<?php echo $rs["a4_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr  >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="1a4_url" value="<?php echo $rs["a4_url"];?>" size="60"></td>
    </tr>
  <tr  >
    <td width="40" rowspan="3" align="right" bgcolor="#FFFFFF">图片五：</td>
    <td bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=1a5_img&form=form3" name="key" width="648" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
    <td rowspan="3" bgcolor="#FFFFFF"> <?php
  if($rs["a5_img"]!=""){
	  echo '<img src="../pic/'.$rs["a5_img"].'" width="100">';
	  }
  ?></td>
  </tr>
  <tr  >
   <td bgcolor="#FFFFFF">文件名：
     <input type="text" name="1a5_img" class="input-text"   value="<?php echo $rs["a5_img"];?>" size="60">&nbsp;</td>
   </tr>
  <tr   >
    <td bgcolor="#FFFFFF">跳转地址：<input type="text" class="input-text"  name="1a5_url" value="<?php echo $rs["a5_url"];?>" size="60"></td>
    </tr>
   
   
<tr>
            <td width="40" bgcolor="#FFFFFF">
      <div align="right"><font color="#FF0000">注意：</font></div>            </td>
            <td colspan="2" bgcolor="#FFFFFF"><font color="#FF0000">以上内容必须填写!</font></td>
    </tr>
<tr>
<td colspan="3" align="center" bgcolor="#FFFFFF"><div align="center">
<div class="butt" style="text-align: center;padding:10px 0;">
                                 <button type="submit" class="btn btn-xs btn-danger" style="margin-right: 50px;padding: 2px 10px;">
                                     <i class="fa fa-plus">
                                     </i>
                                     保存设置
                                 </button>
                                
     						</div>
      <br>
      <br>
</div></td>
</tr>	
                        </table>
	<?php
}
?>
</form>
			</div>
			<div class="tabCon">
               <?
               $conn3=new Mysql();
               $rs=$conn3->getRow("select * from mybanner where id=2");
if($rs)
{
?>
<form name="form2" method="post" action="?Type=Up2">
				<table class="table table-bordered">

<tr >
  <td rowspan="3" align="right" valign="top" bgcolor="#FFFFFF">
      <p>二维码：<br><font color="#FF0000">600px*277px</font></p></td>
  <td valign="top" bgcolor="#FFFFFF"><img src="../pic/<?php echo $rs["ppic_3"];?>" height="100" onerror="this.src='/pic/error.jpg'" ></td>
</tr>
<tr  >
  <td valign="top" bgcolor="#FFFFFF"><iframe 
      src="../pic/images_UP.php?bd=a3_img&form=form2" name="key" width="448" 
      height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
</tr>
<tr >
  <td valign="top" bgcolor="#FFFFFF">文件名：<input type="text"  class="input-text"  name="a3_img" value="<?php echo $rs["ppic_3"];?>" size="60">&nbsp;</td>
</tr>
                    <tr >
                        <td rowspan="3" align="right" valign="top" bgcolor="#FFFFFF">
                            <p>默认内页banner：<br><font color="#FF0000">1920*500px</font></p></td>
                        <td valign="top" bgcolor="#FFFFFF"><img src="../pic/<?php echo $rs["ppic_5"];?>" height="100" onerror="this.src='/pic/error.jpg'" ></td>
                    </tr>
                    <tr  >
                        <td valign="top" bgcolor="#FFFFFF"><iframe
                                    src="../pic/images_UP.php?bd=a5_img&form=form2" name="key" width="448"
                                    height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
                    </tr>
                    <tr >
                        <td valign="top" bgcolor="#FFFFFF">文件名：<input type="text"  class="input-text"  name="a5_img" value="<?php echo $rs["ppic_5"];?>" size="60">&nbsp;</td>
                    </tr>

                    <tr >
                        <td rowspan="3" align="right" valign="top" bgcolor="#FFFFFF">
                            <p>默认内页banner-wap：<br><font color="#FF0000">750px*350px</font></p></td>
                        <td valign="top" bgcolor="#FFFFFF"><img src="../pic/<?php echo $rs["ppic_6"];?>" height="100" onerror="this.src='/pic/error.jpg'" ></td>
                    </tr>
                    <tr  >
                        <td valign="top" bgcolor="#FFFFFF"><iframe
                                    src="../pic/images_UP.php?bd=a6_img&form=form2" name="key" width="448"
                                    height="30" marginheight="0" scrolling="No" frameborder="0" id="key">IE</iframe></td>
                    </tr>
                    <tr >
                        <td valign="top" bgcolor="#FFFFFF">文件名：<input type="text"  class="input-text"  name="a6_img" value="<?php echo $rs["ppic_6"];?>" size="60">&nbsp;</td>
                    </tr>
<tr >
<td colspan="2" align="center" bgcolor="#FFFFFF"><div align="center">
  <button type="submit" class="btn btn-xs btn-danger" style="margin-right: 50px;padding: 2px 10px;">
                                     <i class="fa fa-plus">
                                     </i>
                                     保存设置
                                 </button>
      <br>
      <br>
</div></td>

</tr>	

                        </table>
                        </form>
                        <?php
}
						?>
			</div>
			
		</div>
		
	
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/h-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/h-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script>


<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#tab-system").Huitab({
		index:0
	});
	$("#btn-star").click(function(){
		var files=$("#file-2").val();
		$.get("json/upload.php?files="+files,function(data){
			alert(data);
			})
		})
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
